package com.demo;

/**
 * 枚举单例(线程安全)
 * @author ytj
 * @date 2022/2/21
 */
public enum Single7 {
    INSTANCE;
    public void test(){
        System.out.println("hi");
    }

    public static void main(String[] args) {
        Single7.INSTANCE.test();
    }
}
